package com.coolbi.onsupai.core.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;

import com.coolbi.onsupai.core.dao.AccountFundDeclareDao;
import com.coolbi.onsupai.core.entity.AccountFundDeclare;
import com.coolbi.onsupai.core.mapper.AccountFundDeclareMapper;

public class AccountFundDeclareDaoImpl implements AccountFundDeclareDao {

	@Autowired
	private AccountFundDeclareMapper accuontFundDeclareMapper;
	public void setAccuontFundDeclareMapper(
			AccountFundDeclareMapper accuontFundDeclareMapper) {
		this.accuontFundDeclareMapper = accuontFundDeclareMapper;
	}
	
	@Override
	public AccountFundDeclare save(AccountFundDeclare obj) {
		accuontFundDeclareMapper.save(obj);
		return obj;
	}

	@Override
	public int delete(long id) {
		return accuontFundDeclareMapper.delete(id);
	}

	@Override
	public int update(AccountFundDeclare obj) {
		return accuontFundDeclareMapper.update(obj);
	}

	@Override
	public AccountFundDeclare get(long id) {
		return accuontFundDeclareMapper.get(id);
	}

	@Override
	public List<AccountFundDeclare> list() {
		return accuontFundDeclareMapper.list();
	}

	@Override
	public List<AccountFundDeclare> listByPage(int offset, int limit) {
		Map<String, Object> parameter = new HashMap<String, Object>();
		parameter.put("offset", offset);
		parameter.put("limit", limit);
		return accuontFundDeclareMapper.listByPage(parameter);
	}

	@Override
	public List<AccountFundDeclare> find(Map<String, Object> parameter) {
		return accuontFundDeclareMapper.listByParameter(parameter);
	}

	@Override
	public List<AccountFundDeclare> findByPage(Map<String, Object> parameter,
			int offset, int limit) {
		parameter.put("offset", offset);
		parameter.put("limit", limit);
		return accuontFundDeclareMapper.listByParameterPage(parameter);
	}

	@Override
	public List<AccountFundDeclare> search(Map<String, Object> parameter,
			int offset, int limit) {
		parameter.put("offset", offset);
		parameter.put("limit", limit);
		return accuontFundDeclareMapper.search(parameter);
	}

	@Override
	public int count() {
		return accuontFundDeclareMapper.count();
	}

	@Override
	public int countByKeyWord(Map<String, Object> parameter) {
		return accuontFundDeclareMapper.countByKeyWord(parameter);
	}

	@Override
	public int count(Map<String, Object> parameter) {
		return accuontFundDeclareMapper.countByParameter(parameter);
	}

}
